﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using System.Data.SqlClient;
using ThongTin;

namespace DuLieu
{
   public class KhoaHoc_DL
    {
        KetNoi_DL ketnoi = new KetNoi_DL();
        public DataTable DanhSachKhoaHoc()
        {
            return ketnoi.LayDuLieu("DanhSachKhoaHoc");
        }
        //Thêm Khóa Học
        public int ThemKhoaHoc(KhoaHoc_TT KH)
        {
            int Nparameter = 3;
            string[] name = new string[Nparameter];
            object[] value = new object[Nparameter];
            name[0] = "@MaKhoaHoc"; value[0] = KH.MaKhoaHoc;
            name[1] = "@NgayBatDau"; value[1] = KH.NgayBatDau;
            name[2] = "@NgayKetThuc"; value[2] = KH.NgayKetThuc;
            return ketnoi.CapNhat("ThemKhoaHoc", name, value, Nparameter);
        }


    }

}
